Text field scrolling properties

If a scene contains a text field associated with a variable, there are two special properties associated with the display of that text field:

variable_name.scroll

The scroll value is the line number of the topmost visible line in the text field.

The scroll value is initially set by you. The default is 1, and Flash updates this value as the audience scrolls up and down the text field.

The scroll value may be retrieved and modified.

variable_name.maxscroll

The maxscroll value is the line number that is the maximum value that scroll can be based on the height of the text field.

Flash sets the maxscroll value.

The maxscroll value may be retrieved, but not modified.


Use the scroll property to define where the text field begins displaying its content. This property can be particularly useful to direct an audience to a specific paragraph in a long passage.

For example, in a text field that is four lines in vertical size and identifying variable "speech" which is nine lines, vertically, then only part of the speech can be shown (identified by the solid outlined box):

speech.scroll equals 1 because the textfield starts displaying at the first line.

speech.maxscroll equals 6 because, as the audience scrolls down to see the last line, line 6 is the uppermost limit of the text field.

Note: These variables return unpredictable values if more than one text field displays the same variable at the same time. (This can occur when the audience can scroll through two fields displaying the same variable at the same time).